Improve CI Docker cache reuse#1296
Merged
Merged
Conversation
5ecd502 to
0adf3d4
Compare
0adf3d4 to
3c615a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compile_and_lintinstead of recompilingsqlpagein the database and browser-test jobs.sqlpageartifacts in a PR/ref-scoped cache so source edits can reuse incremental compilation state without allowing PRs to write a trusted main cache.mainremains a restore-only Docker Hub fallback for PRs..cargo/config.tomlinto the Docker dependency warmup layer so the warmup and final build use the sameLIBSQLITE3_FLAGS.Current findings
26915251134, the DB matrix and Playwright jobs used uploaded binaries and did not run Cargo builds.26892512893, amd64-minimalbuild-project.shcompiled onlysqlpage; the previous repeat compiles oflibsqlite3-sys,sqlx-core-oldapi,sqlx-macros-oldapi, andsqlx-oldapidisappeared after copying.cargo/beforebuild-dependencies.sh.context: .. Same-commit reruns had identical Docker frontend args and checkout SHA, but different BuildKit local-context vertex digests, which invalidated every downstreamCOPYand thereforebuild-dependencies.sh.context: "{{defaultContext}}"fixes that instability. The first Git-context build is cold once per platform because the old path-context cache keys are not reusable. After that warmup, same-commit reruns hit: amd64-minimal rerun job79405292019completed in 23 seconds, and armv7-minimal rerun job79406759422completed in 24 seconds, withbuild-dependencies.shandbuild-project.shbothCACHED.Validation
git diff --checkactionlint -ignore 'SC2046' .github/workflows/ci.ymldocker buildx build --check --target builder .26915251134: full workflow passed.26915251134, rerun jobs79405292019and79406759422: same-commit amd64-minimal and armv7-minimal reruns proved the Docker GHA cache hits the dependency layer after the first Git-context warmup for that platform.Reverted experiments
.cargo/config.tomlbefore dependency warmup did.